﻿using System;
using System.Collections.Generic;
using PolePositionMobileUtilityEntity.Entities;

namespace PolePositionMobileUtilityEntity
{
    public class EUtilityInspection
    {
        #region Fields
        private int m_Id;
        private double m_Latitude;
        private double m_Longitude;
        private int m_Year;
        private DateTime m_LVisit;
        private string m_Number;
        private DateTime m_AcquisitionDate;
        private EMap m_Map;
        private ESection m_Section;
        private ETreatment m_Treatment;
        private EClass m_Class;
        private ESpecie m_Specie;
        private EToptype m_Toptype;
        private ELength m_Length;
        private EInspector m_Inspector;
        private ECompany m_Company;
        private EVisitType m_VisitType;
        private List<EImage> m_Images;
        private int m_GuardQuantity;
        private string m_LastCompany;
        public bool PoleTag { get; set; }
        public bool GroundWireRepair { get; set; }
        public bool Billable { get; set; }

        #endregion

        #region Properties

        public EVisitType VisitType
        {
            get
            {
                return m_VisitType;
            }
            set
            {
                m_VisitType = value;
            }

        }

        public string LastCompany
        {
            get
            {
                return m_LastCompany;
            }
            set
            {
                m_LastCompany = value;
            }
        }

        public int Id
        {
            get
            {
                return m_Id;
            }
            set
            {
                m_Id = value;
            }
        }
        public double Latitude
        {
            get
            {
                return m_Latitude;
            }
            set
            {
                m_Latitude = value;
            }
        }
        public double Longitude
        {
            get
            {
                return m_Longitude;
            }
            set
            {
                m_Longitude = value;
            }
        }
        public int Year
        {
            get
            {
                return m_Year;
            }
            set
            {
                m_Year = value;
            }
        }
        public DateTime LVisit
        {
            get
            {
                return m_LVisit;
            }
            set
            {
                m_LVisit = value;
            }
        }
        public string Number
        {
            get
            {
                return m_Number;
            }
            set
            {
                m_Number = value;
            }
        }

        public int GuardsQuantity
        {
            get
            {
                return m_GuardQuantity;
            }
            set
            {
                m_GuardQuantity = value;
            }
        }

        public DateTime AcquisitionDate
        {
            get
            {
                return m_AcquisitionDate;
            }
            set
            {
                m_AcquisitionDate = value;
            }
        }
        public EMap Map
        {
            get
            {
                return m_Map;
            }
            set
            {
                m_Map = value;
            }
        }
        public ETreatment Treatment
        {
            get
            {
                return m_Treatment;
            }
            set
            {
                m_Treatment = value;
            }
        }
        public EClass Class
        {
            get
            {
                return m_Class;
            }
            set
            {
                m_Class = value;
            }
        }
        public ESpecie Specie
        {
            get
            {
                return m_Specie;
            }
            set
            {
                m_Specie = value;
            }
        }
        public EToptype Toptype
        {
            get
            {
                return m_Toptype;
            }
            set
            {
                m_Toptype = value;
            }
        }
        public ELength Length
        {
            get
            {
                return m_Length;
            }
            set
            {
                m_Length = value;
            }
        }
        public EInspector Inspector
        {
            get
            {
                return m_Inspector;
            }
            set
            {
                m_Inspector = value;
            }
        }
        public ECompany Company
        {
            get
            {
                return m_Company;
            }
            set
            {
                m_Company = value;
            }
        }
        public List<EImage> Images
        {
            get
            {
                return m_Images;
            }
            set
            {
                m_Images = value;
            }
        }

        public ESection Section
        {
            get { return m_Section; }
            set { m_Section = value; }
        }

        #endregion

        public EUtilityInspection() 
        {
            m_Id = Int32.MinValue;
            m_Latitude = double.MinValue;
            m_Longitude = double.MinValue;
            m_Year = Int32.MinValue;
            m_LVisit = DateTime.MinValue;
            m_Number = string.Empty;
            m_LastCompany = string.Empty;
            m_AcquisitionDate = DateTime.MinValue;
            m_Map = new EMap();
            m_Treatment = new ETreatment();
            m_Class = new EClass();
            m_Specie = new ESpecie();
            m_Toptype = new EToptype();
            m_Length = new ELength();
            m_Inspector = new EInspector();
            m_Company = new ECompany();
            m_Images = new List<EImage>();
            m_Section = new ESection();
            m_GuardQuantity = Int32.MinValue;
        }

        public EUtilityInspection(double latitude, double longitude)
            : this()
        {
            m_Latitude = latitude;
            m_Longitude = longitude;
        }

    }
}
